package com.xcf.service.business.common.abroadportmanagement.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.xcf.dao.DaoSupport;
import com.xcf.entity.Page;
import com.xcf.service.business.common.abroadportmanagement.AbroadPortManagementService;
import com.xcf.util.PageData;
@Service("AbroadPortManagementServiceImpl")
public class AbroadPortManagementServiceImpl implements AbroadPortManagementService {
	@Resource(name="daoSupport")
	private DaoSupport daoSupport;

	//列表的显示及查询
		@Override
		public List<PageData> seach(Page pd) throws Exception {
			
			return (List<PageData>) daoSupport.findForList("abroadmanagementmapper.seach", pd);
		}

		//点击添加保存一条
		@Override
		public void addabroad(PageData pd) {
			try {
				daoSupport.save("abroadmanagementmapper.addabroad", pd);
			} catch (Exception e) {
			
				e.printStackTrace();
			}
			
		}

		//去修改页面
		@Override
		public PageData seacById(PageData pd) throws Exception {
			
			return (PageData) daoSupport.findForObject("abroadmanagementmapper.seacById", pd);
		}

		//修改
		@Override
		public void updateabroad(PageData pd) {
			try {
				daoSupport.update("abroadmanagementmapper.updateabroad", pd);
			} catch (Exception e) {
				
				e.printStackTrace();
			}
			
		}

		//删除
		@Override
		public void delete(PageData pd) {
			try {
				daoSupport.delete("abroadmanagementmapper.deleteabroad", pd);
			} catch (Exception e) {
				
				e.printStackTrace();
			}
			
		}
}
